<template>
	<view class="music_head"  :style="{ color: color }">
		<view class="music_head_icon" :class="{ 'music_head_iconBlack' : iconBlack}" v-if="icon" >
			<text class="iconfont icon-zuojiantou" @tap="hadleToBack"></text> |
			<text class="iconfont icon-shouye-shouye" @tap="hadleToHome"></text>
		</view>
		{{title}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props:["title", "icon", "color", "iconBlack"],
		onLoad() {

		},
		methods: {
			// 返回上一页
			hadleToBack(){
				uni.navigateBack()
			},
			// 返回首页
			hadleToHome(){
				uni.reLaunch({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.music_head {
		width: 100%;
		height: 150rpx;
		text-align: center;
		line-height: 150rpx;
		font-size: 32rpx;
		color: black;
		position: relative;
		.music_head_icon {
			position: absolute;
			top: 52rpx;
			left: 16rpx;
			background: rgba(0, 0, 0, .4);
			border-radius: 30rpx;
			width: 180rpx;
			height: 58rpx;
			display: flex;
			justify-content: space-evenly;
			line-height: 55rpx;
			color: white;
		}
		.music_head_iconBlack {
			color: black;
			background: white;
			border: 2rpx solid #eaeaea;
		}
	}
</style>
